package com.rocket.transaction_message.listener;

import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * 消费者
 *
 * @author CKC
 * @date 2023/2/2 12:37
 */
@Component
@RocketMQMessageListener(consumerGroup = "hello", topic = "1234", consumeMode = ConsumeMode.CONCURRENTLY)
public class RocketMessageListener implements RocketMQListener<String> {
    @Override
    public void onMessage(String message) {
        System.out.println("====>:" + message);
    }
}
